package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: homechen
 * Date: 2024-03-23
 * Time: 18:57
 */
public class OuterClass3 {
    public void outerMethod() {
        // 匿名内部类
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                System.out.println("hello");
            }
        };
        Thread t = new Thread(runnable);
        t.start();
    }

    public static void main(String[] args) {
        OuterClass3 outerClass3 = new OuterClass3();
        outerClass3.outerMethod();
    }

}
